﻿using System;
using System.Collections.Generic;
using System.Text;
using HAVNet.Core;


namespace HAVNet.Intros.AST
{
    public class ASTMemberDeclIndexerI : ASTMemberDeclI
    {
        ASTFormalParamList              _formalParamList= null;
        ASTAccessorInterfaces           _accessors      = null;

        public ASTFormalParamList       formalParamList { get { if (null == _formalParamList) _formalParamList  = new ASTFormalParamList    (); return _formalParamList;} }
        public ASTAccessorInterfaces    accessors       { get { if (null == _accessors      ) _accessors        = new ASTAccessorInterfaces (); return _accessors;      } }

        public override string ToString ()
        {
            string sMods = "";
            if (Mods.has(modifiers, Mods.newMod)) sMods += "new ";

            return 
                Lazy.toStringNN (_attrGroups, "", Environment.NewLine) +
                sMods +
                "this [" + formalParamList.ToString().Trim() + "] " +
                "{ " + accessors.ToString() + " }" + Environment.NewLine;
        }
    }
}
